#ifndef PARAMSSETAPI_H
#define PARAMSSETAPI_H

#include "Entity/SysConfig.h"
#include <QObject>
#include <QMainWindow>
#include <QtNetwork>
#include <QDebug>
#include <QJsonArray>
#include <QJsonDocument>
#include <QJsonObject>
#include <Utils.h>
#include <config.h>

class ParamsSetApi : public QObject
{
    Q_OBJECT
public:
    explicit ParamsSetApi(QObject *parent = nullptr);

    //查询参数列表
    QNetworkReply* list(int pageNum,int pageSize,QString configName = "",
                        QString configKey = "",QString configType = "",
                        QString beginTime = "",QString endTime = "");
    //查询状态字典
    QNetworkReply* sys_yes_no();
    //删除
    QNetworkReply* deleteItems(QString ids);
    QNetworkReply* getById(QString id);
    //更新
    QNetworkReply* update(SysConfig *s);
    //增加
    QNetworkReply* add(SysConfig *s);
    //刷新缓存
    QNetworkReply* refreshCache();

private:
    QString baseUrl ;
    QNetworkRequest request;
    QNetworkAccessManager *manager ;

};

#endif // PARAMSSETAPI_H
